#ifndef __CLIENT_CALLBACK_GAME_H__
#define __CLIENT_CALLBACK_GAME_H__
class PacketDecoder;
typedef void (*GameMethodData)(PacketDecoder* request);

class ClientCallbackGame : public ISocketClientCallback,public PacketDispatcher,public singleton<ClientCallbackGame>
{
public:
	ClientCallbackGame();
	ClientCallbackGame(ISocketClient *pSocketClient);
	virtual void OnConnect();
	virtual void OnReconnect();
	virtual void OnRecvData(const void* pData, size_t nDataLen);
	virtual void OnCloseConnection();
	virtual void OnUpdate();

	ISocketClient * getSocketClient(){ return m_pSocketClient;};
	void setSocketClient(ISocketClient* p){ m_pSocketClient = p;};
	void phPing_0(void *pDecoder);

	void SendPacket(PacketEncoder& encoder);
private:
	ISocketClient *m_pSocketClient;
};
#endif
//extern  "C" 
//{
// ISocketClientCallback* CreateClientCallbackData(ISocketClient*pSocketClient);
//}

